import { network } from '@/utils';
import { ShelvesToHeapAddParams } from './data';

import { basic } from '../../../../../config/Apis';

export async function queryShelvesToHeapDetail(params: { id: number }) {
  return network.get(basic.shelf, {
    params,
  });
}

export async function operSaveOrUpdate(params: ShelvesToHeapAddParams) {
  return params.id ? network.put(basic.shelf, { data: params })
    : network.post(basic.shelf, { data: params });
}
